[mirrors]
http://ftp.postgresql.org/pub/source/v9.4.8/postgresql-9.4.8.tar.bz2

[vars]
filesize=17740626
sha512=d1cc8a02ed7eb0af365479cee43b3cd33fade69e07eb82343cd562efda5a460e405836e1fb2492a8cb22a71d14038216868cb48694400b3c31a56c4aee0bcac4
desc="professional SQL database server and interface libraries"
uchkurl=http://ftp.postgresql.org/pub/source/

[deps.host]
python

[deps]
libressl
libxml2
libxslt
readline
timezones

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine) \
  --with-sysroot=$butch_root_dir --with-system-tzdata="$butch_prefix"/etc/zoneinfo"

CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
./configure -C --prefix="$butch_prefix" $xconfflags \
  --enable-thread-safety \
  --docdir="$butch_prefix"/share/doc/postgresql \
  --mandir="$butch_prefix"/share/man
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

IS="$K"/bin/butch-install-service
"$IS" --down --log --force postgres "$K"/services/postgres
